﻿using QG.FrontDesk.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QG.FrontDesk.DAL.IRepository
{
   public interface IUserInfoRepository
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        UserInfo Getlogin(UserInfo userInfo);
        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        bool AddUserInfo(UserInfo userInfo);
        /// <summary>
        /// 手机验证登录
        /// </summary>
        /// <param name="verificationCode"></param>
        /// <returns></returns>
        VerificationCode GetMobilelogin(VerificationCode verificationCode);

        /// <summary>
        /// 通过电话得到用户信息
        /// </summary>
        /// <param name="phone"></param>
        /// <returns></returns>
        UserInfo GetUserByPhone(string phone);
        /// <summary>
        /// 得到对应的用户信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        UserInfo GetUserInfo(int Id);

        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        int UpdateUserInfo(UserInfo userInfo);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="oldpassword"></param>
        /// <param name="newpassword"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        int UpdatePassword(string oldpassword, string newpassword, int userId);

        /// <summary>
        /// 通过QQ得到用户信息
        /// </summary>
        /// <param name="QQ"></param>
        /// <returns></returns>
        UserInfo GetUserInfoByQQ(string QQ);

        /// <summary>
        /// 新增QQ用户
        /// </summary>
        /// <param name="userInfo"></param>
        /// <returns></returns>
        bool AddQQUserInfo(UserInfo userInfo);

    }
}
